#!/bin/bash
#for armv7
#export PATH=$PATH:/projects/hnd/tools/linux/armv7-firehome-arm-linux-2.6.36-uclibc-4.5.3/bin/
export PATH=$PATH:/projects/tianyi_ont/crosstools-mips-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21/usr/bin
export CROSSCOMPILE=mips-unknown-linux-uclibc-
#export ENV_LDFLAGS=/opt/trunk/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libatomic.a
export HOST=mips
export DEVNAME=tianyi
export HTTPS_SUPPORT=1
export USE_WOLFSSL=1
#天邑需要静态连接，原因为pthread库问题
export LDFLAGS=-static


if [ "$1" = "release" ]; then
	make && make release
else
	make && make tar
fi 
make clean -C test && make -C test
